Colin Walters [Wed, 10 Jul 2013 06:30:26 +0000 (02:30 -0400)]
admin: Add a warm fuzzy message to deploy about transactions
Since it sounds cool and stuff.
Colin Walters [Wed, 10 Jul 2013 04:00:11 +0000 (00:00 -0400)]
TODO: Misc updates
Colin Walters [Wed, 10 Jul 2013 00:38:05 +0000 (20:38 -0400)]
Delete leftover kernel update hooks
Colin Walters [Wed, 10 Jul 2013 00:31:55 +0000 (20:31 -0400)]
Build without libsoup again
Colin Walters [Wed, 10 Jul 2013 00:30:00 +0000 (20:30 -0400)]
ostree: Some header file cleanups
Colin Walters [Wed, 10 Jul 2013 00:16:49 +0000 (20:16 -0400)]
cmd: Drop "ostree admin install" and curl fetcher
It isn't useful at the moment, since the deploy stuff all changed. It
will make sense to bring back later, but for now let's not carry
broken untested code.
Colin Walters [Wed, 10 Jul 2013 00:14:53 +0000 (20:14 -0400)]
libostree: Move pull code into here
More library work.
Colin Walters [Wed, 10 Jul 2013 00:05:31 +0000 (20:05 -0400)]
libostree: Move prune into OstreeRepo namespace
More library work.
Colin Walters [Tue, 9 Jul 2013 23:59:39 +0000 (19:59 -0400)]
libostree: Rename ostree-traverse.h into OstreeRepo namespace
This operates on the repo, it might as well be methods on it.
Colin Walters [Tue, 9 Jul 2013 23:49:00 +0000 (19:49 -0400)]
libostree: Split off -refs.c
Continuing to break up ostree-repo.c.
Colin Walters [Tue, 9 Jul 2013 23:11:37 +0000 (19:11 -0400)]
libostree: Split off libarchive code
Colin Walters [Tue, 9 Jul 2013 23:02:38 +0000 (19:02 -0400)]
libostree: Start splitting up the monstrous ostree-repo.c
Checkout now lives in its own file.
Colin Walters [Tue, 9 Jul 2013 22:53:22 +0000 (18:53 -0400)]
Switch to #pragma once for headers
It's just less tedious, and we're GCC/LLVM specific anyways.
Colin Walters [Tue, 9 Jul 2013 22:46:00 +0000 (18:46 -0400)]
pull: Explicitly use thread-default main context
As preparation for pushing our own temporary context.
Colin Walters [Tue, 9 Jul 2013 22:23:55 +0000 (18:23 -0400)]
admin: Use internal pull API instead of subprocess
So we're doing more of the library thing.
Colin Walters [Tue, 9 Jul 2013 22:33:30 +0000 (18:33 -0400)]
pull: Destroy queue watching GSource
When being more of a library, we can't leave garbage attached to the
default main context.
Colin Walters [Tue, 9 Jul 2013 21:56:51 +0000 (17:56 -0400)]
core: Move pull logic into an API
The general trend should be becoming more of a shared library with
command line wrappers.
Colin Walters [Tue, 9 Jul 2013 19:40:20 +0000 (15:40 -0400)]
pull: Add "tls-permissive" config option to disable SSL/TLS certificate checks
Like GIT_SSL_NO_VERIFY=true, available for the same reasons.
Colin Walters [Tue, 9 Jul 2013 19:02:48 +0000 (15:02 -0400)]
pull: Verify SSL/TLS certificates against system CA file by default
We also need a mechanism like GIT_SSL_NO_VERIFY...probably an option
in the config.
Colin Walters [Tue, 9 Jul 2013 16:04:02 +0000 (12:04 -0400)]
prepare-root: Don't be strict about the sysroot mount name here
While the systemd integration effectively requires /sysroot, it will
help people trying to use OSTree with other initramfs systems
(e.g. initramfs-tools) if we don't hardcode that requirement in this
tool.
Colin Walters [Tue, 9 Jul 2013 15:28:49 +0000 (11:28 -0400)]
tests: Add a test of corruption during a pull process
These corruption tests could be a lot better...like randomly try
single bit flips, range flips. Better, content-aware fuzzing. But
this is useful for now.
Colin Walters [Tue, 9 Jul 2013 14:41:07 +0000 (10:41 -0400)]
tests: Drop numeric prefix
Theoretically it's useful to have layers of tests, but in practice
it's just annoying to assign numbers.
Colin Walters [Tue, 9 Jul 2013 13:28:02 +0000 (09:28 -0400)]
Fix test reference to obsolete ostree-pull
It was leftover in my buildroot =/
Colin Walters [Mon, 8 Jul 2013 13:05:34 +0000 (09:05 -0400)]
repo: Store transaction file, use it to optimize for pull resumes
If pull is interrupted, we may have downloaded an arbitrary subset of
the requested objects. Previously, we handled this by scanning for
all objects each time.
However, there's an easy optimization - this patch creates a lock file
in the repo. If we don't see that file when starting a pull, we know
we don't need to stat() every file; presence of a dirtree object for
example implies the existence of everything it references.
Colin Walters [Mon, 8 Jul 2013 01:55:25 +0000 (21:55 -0400)]
Drop obsolete GRUB2 and kernel update hooks
We only support syslinux at the moment; grub2 should learn to parse
the bootloader spec.
Colin Walters [Mon, 8 Jul 2013 00:54:03 +0000 (20:54 -0400)]
Release 2013.3
Colin Walters [Mon, 8 Jul 2013 01:35:15 +0000 (21:35 -0400)]
Add a few more bits to EXTRA_DIST
Colin Walters [Sun, 7 Jul 2013 22:14:53 +0000 (18:14 -0400)]
Remove stub daemon code
This really shouldn't have lived so long...it does nothing now, and we
should probably just be exposing an API for packagekit anyways.
Colin Walters [Sun, 7 Jul 2013 18:37:59 +0000 (14:37 -0400)]
Remove built in "triggers"
Originally, the idea was that clients would replicate "OS/tree"s from
a build server, but we'd run things like "ldconfig" on the client.
This was to allow adding e.g. the nVidia binary driver.
However, the triggers were the only thing in the system at the moment
that really had expected knowledge of the *contents* of the OS, like
the location of binaries.
For now, it's architecturally cleaner if we move the burden of
triggers to the tree builder (e.g. gnome-ostree or RPM). Eventually
we may want OSTree to assist with this type of thing (perhaps
something like RPM %ghost), but this is the right thing to do now.
Colin Walters [Sun, 7 Jul 2013 18:30:01 +0000 (14:30 -0400)]
admin: Fix various compiler warnings
Colin Walters [Sun, 7 Jul 2013 17:45:18 +0000 (13:45 -0400)]
admin: Also delete unsed boot directories
My VM filled up /boot. Oops.
Colin Walters [Sun, 7 Jul 2013 16:42:02 +0000 (12:42 -0400)]
admin: Split up the monstrous ot-admin-functions.c
Now util, cleanup, and functions.
Colin Walters [Sun, 7 Jul 2013 16:27:44 +0000 (12:27 -0400)]
Switch to libgsystem local allocation macros
And drop our compatibility wrapper.
Colin Walters [Sat, 29 Jun 2013 15:45:53 +0000 (11:45 -0400)]
[INCOMPATIBLE CHANGE] Implement new deployment model
See https://wiki.gnome.org/OSTree/DeploymentModel2
This is a major rework of the on-disk filesystem layout, and the boot
process. OSTree now explicitly supports upgrading kernels, and these
upgrades are also atomic.
The core concept of the new model is the "deployment list", which is
an ordered list of bootable operating system trees. The deployment
list is reflected in the bootloader configuration; which has a kernel
argument that tells the initramfs (dracut) which operating system root
to use.
Invidiual notable changes that come along with this:
1) Operating systems should now come with their etc in usr/etc; OSTree
will perform a 3-way merge at deployment time, and place etc in
the actual root. This avoids the need for a bind mount, and is
just a lot cleaner.
2) OSTree no longer bind mounts /root, /home, and /tmp. It is expected
that the the OS/ has these as symbolic links into /var.
At the moment, OSTree only supports managing syslinux; other
bootloader backends will follow.
Colin Walters [Fri, 5 Jul 2013 21:29:07 +0000 (17:29 -0400)]
deploy: Error out if we see usr/etc
This version of the code doesn't know what to do with new-model trees,
so just abort if we see that. We'll likely never care about upgrades
from 1.0 to 2.0.
Colin Walters [Fri, 5 Jul 2013 20:51:47 +0000 (16:51 -0400)]
core: Allow '.' in refspecs too
For version numbers.
Colin Walters [Fri, 5 Jul 2013 20:12:10 +0000 (16:12 -0400)]
Add "trivial-httpd" builtin, use it in tests
A simple HTTP server implementation is so few lines of code when one
is linking to libsoup anyways, so let's just have one here in ostree
that will be used for the test suite.
This allows us to run the archive tests that previously required
apache even in gnome-ostree.
Colin Walters [Tue, 2 Jul 2013 15:24:07 +0000 (11:24 -0400)]
tests: Pull from file:/// only works with archive-z right now
Colin Walters [Tue, 2 Jul 2013 02:35:54 +0000 (22:35 -0400)]
pull: Make fetcher work for file:/// URIs too
Even if very suboptimally, for now; we copy the files, then copy them
again.
The obvious long term plan is to merge pull-local and pull together,
but truly optimizing that requires the pull code to know how to use
the OstreeRepo APIs when operating on local repositories (as
pull-local does), rather than assuming the remote is an archive-z
fetched over HTTP.
Colin Walters [Mon, 1 Jul 2013 14:18:26 +0000 (10:18 -0400)]
Add support for deleting refs
The internal API will be used by admin, and "ostree refs --delete"
is handy for interactive management.
Colin Walters [Sat, 29 Jun 2013 18:51:08 +0000 (14:51 -0400)]
Add "refs" builtin
This is just useful to look at before pruning, etc.
Colin Walters [Sat, 29 Jun 2013 18:02:17 +0000 (14:02 -0400)]
Add a bit more testing for prune
Colin Walters [Sat, 29 Jun 2013 17:48:26 +0000 (13:48 -0400)]
Extract prune logic into an internal API
This will be used by ostree admin deploy.
Colin Walters [Sat, 29 Jun 2013 15:44:26 +0000 (11:44 -0400)]
pull-local: Support --remote argument
For offline upgrades, pull-local can now write the refs into a
specific remote, rather than using the local heads.
Colin Walters [Sat, 29 Jun 2013 15:42:33 +0000 (11:42 -0400)]
core: Add "refspec" which is remote:refname
This allows an unambiguous reference; otherwise, it was too easy to
have confusion between local heads and remotes.
Colin Walters [Sat, 29 Jun 2013 15:43:31 +0000 (11:43 -0400)]
gioutils: Many new utility functions
Reading symbolic links becomes a much more common thing now.
Colin Walters [Sun, 23 Jun 2013 21:56:14 +0000 (17:56 -0400)]
prepare-root: Only bind mount /home, /tmp, /root if they are directories
What we expect for new systems is for these to be symbolic links:
/home -> /sysroot/home
etc.
Colin Walters [Fri, 14 Jun 2013 23:45:40 +0000 (19:45 -0400)]
core: Port more callsites to gs_file_enumerator_iterate()
See previous commit.
Colin Walters [Fri, 14 Jun 2013 23:14:35 +0000 (19:14 -0400)]
core: Update libgsystem, port some uses of GFileEnumerator
This makes the code *so* much nicer.
Colin Walters [Sat, 8 Jun 2013 18:15:43 +0000 (14:15 -0400)]
pull-local: Fix race condition pointed out by Benjamin
We could drop into g_main_loop_run() after the worker
thread had called g_main_loop_quit().
Fix this by following the pattern suggested by Ryan of a while loop
around our termination condition, and g_main_context_iteration().
Colin Walters [Sat, 8 Jun 2013 16:58:44 +0000 (12:58 -0400)]
pull-local: Fix race condition
https://bugzilla.gnome.org/show_bug.cgi?id=701861
Colin Walters [Tue, 4 Jun 2013 17:18:36 +0000 (13:18 -0400)]
dracut: Add ostree-remount
Linux creates a copy of the soure mount flags when creating a bind
mount; if the source is read-only, then the bind mount is.
The problem is that systemd will remount the rootfs read/write, but
each mount (/home, /var etc.) will still be read-only. We need to
remount every bind mount except for /usr to read-write too.
This only "worked" with the old ostree-switch-root because it
effectively force mounted the rootfs read-write always, ignoring the
"ro" flag.
Colin Walters [Tue, 4 Jun 2013 00:49:07 +0000 (20:49 -0400)]
dracut: Also ensure we're using the systemd module
I can't work out how this happens otherwise in Fedora...
Colin Walters [Mon, 3 Jun 2013 18:12:40 +0000 (14:12 -0400)]
Add --with-dracut
This installs a Dracut module which parses the ostree= kernel command
line argument, and if given, sets up the OS/ at /sysroot, which
systemd's switch-root then moves into. This only works if dracut is
configured to use systemd itself.
Colin Walters [Mon, 3 Jun 2013 02:18:19 +0000 (22:18 -0400)]
ostree-prepare-root: Don't require an extraneous argument
Colin Walters [Mon, 3 Jun 2013 01:41:08 +0000 (21:41 -0400)]
ostree-prepare-root: Parse /proc/cmdline, make RPRIVATE, set up /sysroot
This does everything we need except for the actual switch-root.
Colin Walters [Sun, 2 Jun 2013 19:36:56 +0000 (15:36 -0400)]
ostree-prepare-root: New binary, used for systemd-in-initramfs setups
Rather than attempting to hack up the "switch-root" functionality of
systemd, this binary allows us to simply prepare the root before we
switch into it.
Colin Walters [Fri, 31 May 2013 17:09:27 +0000 (13:09 -0400)]
Drop support for generating initramfs images client side using dracut
This is the responsibility of whatever is generating filesystem trees.
Colin Walters [Thu, 30 May 2013 22:32:46 +0000 (18:32 -0400)]
Fold ostree-pull into main binary
The rationale for the separation was always kind of weak; I want to
refactor the command line argument parsing, and it was complicating
things.
Colin Walters [Mon, 27 May 2013 13:29:33 +0000 (09:29 -0400)]
pull: Exit cleanly with an error on failure to fetch refs
Colin Walters [Mon, 27 May 2013 13:29:05 +0000 (09:29 -0400)]
upgrade: Actually prune deployments again
That was a rather critical logic error...
Colin Walters [Fri, 17 May 2013 01:42:24 +0000 (21:42 -0400)]
TODO: Update
Colin Walters [Thu, 16 May 2013 19:37:49 +0000 (15:37 -0400)]
upgrade: Actually deploy upgraded tree again
I need a brown paper bag for this one...
Colin Walters [Thu, 16 May 2013 12:29:20 +0000 (08:29 -0400)]
admin: Add -r option to upgrade to initiate a reboot if tree changes
$ ostree admin upgrade -r
is convenient to fire off inside a VM and come back to it later.
Colin Walters [Wed, 15 May 2013 12:18:53 +0000 (08:18 -0400)]
upgrade: Don't require specification of osname
Since this is a highly visible command, let's have a sane default and
upgrade the currently running OS.
Colin Walters [Wed, 1 May 2013 23:15:06 +0000 (19:15 -0400)]
Add a --version argument that also outputs features
And use it in the tests to skip libarchive tests when the build
doesn't support it.
Colin Walters [Wed, 1 May 2013 22:43:01 +0000 (18:43 -0400)]
archive-test: Handle umask of 022 or 002
Red Hat appears to default to 002, whereas Debian systems default
to 022. Fun.
Colin Walters [Wed, 1 May 2013 19:26:21 +0000 (15:26 -0400)]
Install tests
Matching https://live.gnome.org/GnomeGoals/InstalledTests
Colin Walters [Wed, 1 May 2013 16:15:02 +0000 (12:15 -0400)]
checkout: Add --allow-noent option
This is useful for the gnome-ostree build system where each build is
one commit, but it's split up into /runtime /devel /debug etc. trees.
Ideally we wouldn't have a /debug subdirectory for "noarch"
components for example.
So add an option to not error out if the given path doesn't exist in
the commit.
Colin Walters [Tue, 30 Apr 2013 23:34:20 +0000 (19:34 -0400)]
repo: Fix race condition in async checkout
When multiple threads need to uncompress an object, there was
a race condition where thread A could get EEXIST, unlink,
then thread B calls linkat(), then thread A tries to link() but
fails.
We can just loop in this case.
Colin Walters [Tue, 30 Apr 2013 02:08:56 +0000 (22:08 -0400)]
libotutil: Drop is-hidden from fast queryinfo
Since now we look at .hidden files and bang on the mainloop for every
file lookup if that's specified =(
Colin Walters [Mon, 29 Apr 2013 18:04:48 +0000 (14:04 -0400)]
libgsystem: Update to latest
Colin Walters [Fri, 26 Apr 2013 22:15:51 +0000 (18:15 -0400)]
deploy: Swap current symlink only after updating the kernel
While this still isn't fully atomic (that depends on the bootloader),
this better ensures that the deployed kernel is booted with the
intended tree. For example, if we get ENOSPC when writing out the
kernel, we won't have swapped the symlink.
Colin Walters [Mon, 22 Apr 2013 16:27:47 +0000 (12:27 -0400)]
libgsystem: Update
Colin Walters [Sun, 21 Apr 2013 14:39:27 +0000 (10:39 -0400)]
pull-deploy: Tweak documentation to show using it for switching trees
Colin Walters [Mon, 15 Apr 2013 16:50:58 +0000 (12:50 -0400)]
admin: Use linkcopy_sync_data() for initramfs instead of rename()
It's possible (likely even) that /tmp is on a separate filesystem; in
that case, a raw rename() is going to fail.
Saw this on the ostree.gnome.org builder.
Colin Walters [Mon, 8 Apr 2013 20:55:35 +0000 (16:55 -0400)]
prune: Use g_format_size() so we get a human-readable number
We don't really care about the precise bytes.
Colin Walters [Wed, 3 Apr 2013 04:50:16 +0000 (00:50 -0400)]
waitablequeue: Only use API from GLib 2.34
As intended.
Colin Walters [Tue, 2 Apr 2013 02:23:46 +0000 (22:23 -0400)]
Release 2013.2
Colin Walters [Tue, 2 Apr 2013 02:18:56 +0000 (22:18 -0400)]
build: Add scripts to EXTRA_DIST
...because Automake apparently doesn't.
Colin Walters [Tue, 2 Apr 2013 01:52:24 +0000 (21:52 -0400)]
switchroot: Suppress compiler warning for asprintf
We're not going to run OOM here, if we do, we're totally screwed
anyways.
Colin Walters [Tue, 2 Apr 2013 01:36:40 +0000 (21:36 -0400)]
Release 2013.1
Colin Walters [Fri, 29 Mar 2013 21:16:03 +0000 (17:16 -0400)]
pull: Rework threading communication model
Previously, I've observed bugs where we either:
1) Exit too early, leaving undownloaded objects
2) Hang while downloading
This rewrite hopefully fixes both.
Colin Walters [Mon, 1 Apr 2013 22:53:12 +0000 (18:53 -0400)]
run-apache: Use -DFOREGROUND, not -X
-X implies debug mode which limits the workers to 1, which totally
kills parallelism.
Colin Walters [Mon, 1 Apr 2013 15:43:03 +0000 (11:43 -0400)]
core: Fix object enumeration for archive-z2 repositories
This makes fsck work again, among other things.
Colin Walters [Fri, 29 Mar 2013 21:22:56 +0000 (17:22 -0400)]
pull: Drop support for original archive repositories
For future refactoring here, it's just too complex to maintain support
for both of them, and the advantages of archive-z2 outweigh archive
too much.
Colin Walters [Tue, 26 Mar 2013 12:29:30 +0000 (08:29 -0400)]
tests: Update expected diff output
For previous diff commit.
Colin Walters [Mon, 18 Mar 2013 22:11:00 +0000 (18:11 -0400)]
admin: Assume we're using /ostree if there's a toplevel /usr
Mainly so admin install works without an existing /ostree again.
Colin Walters [Sat, 16 Mar 2013 21:45:15 +0000 (17:45 -0400)]
admin: Support installing pregenerated initramfs images from tree
Us running dracut is a hack, basically. We should default to
generating this on the server.
Colin Walters [Tue, 12 Mar 2013 22:45:27 +0000 (18:45 -0400)]
build: Bump GLib dependency to 2.34.0
Just cleaner than an unstable version.
Colin Walters [Tue, 12 Mar 2013 12:47:11 +0000 (08:47 -0400)]
config-diff: Properly print files relative to root
Just less ugly.
Colin Walters [Thu, 7 Mar 2013 21:46:41 +0000 (16:46 -0500)]
admin: Fix lookup of active root
This should hopefully *really* fix deleting running deployments
https://bugzilla.gnome.org/show_bug.cgi?id=694762
Colin Walters [Mon, 4 Mar 2013 23:00:23 +0000 (18:00 -0500)]
admin: Don't delete the running deployment
https://bugzilla.gnome.org/show_bug.cgi?id=694762
Colin Walters [Mon, 4 Mar 2013 16:52:43 +0000 (11:52 -0500)]
deploy: Don't run triggers if /usr/share/ostree/triggers-run exists
This is preparatory work for a future gnome-ostree commit where we'll
default to running triggers on the build server side.
Colin Walters [Tue, 26 Feb 2013 17:19:05 +0000 (12:19 -0500)]
Update libgsystem
Colin Walters [Sun, 24 Feb 2013 15:00:23 +0000 (10:00 -0500)]
core: Use default /sysroot/ostree/repo or just /ostree/repo as appropriate
The old logic was just weird, special casing root, and we can easily
autodetect the case where we need /ostree/repo.
Colin Walters [Sun, 24 Feb 2013 11:35:23 +0000 (06:35 -0500)]
build: Use AC_SYS_LARGEFILE
So we do the right thing on 32 bit.
Colin Walters [Sat, 23 Feb 2013 16:15:19 +0000 (11:15 -0500)]
pull-local: Don't call g_hash_table_init() on a NULL hash
Not sure why this wasn't crashing before.
Colin Walters [Sat, 23 Feb 2013 16:02:56 +0000 (11:02 -0500)]
core: Add API to convert csum -> checksum without malloc()
Just doing some profiling, this was in the top malloc() callers.
Colin Walters [Thu, 21 Feb 2013 18:05:14 +0000 (13:05 -0500)]
pull-local: Fix uninitialized variable ref